package com.xyht.medicine_management_system.modules.stock.service;

import com.xyht.medicine_management_system.common.commonReturn.ResponseResult;
import com.xyht.medicine_management_system.modules.stock.entity.MmsMedicineStock;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xyht.medicine_management_system.modules.stock.entity.req.*;

import javax.servlet.http.HttpServletResponse;
import java.util.Map;
import java.util.concurrent.Future;

/**
 * <p>
 * 药品库存 服务类
 * </p>
 *
 * @author XYHT
 * @since 2023-11-30
 */
public interface MmsMedicineStockService extends IService<MmsMedicineStock> {

    ResponseResult addMedicineStock(MmsMedicineStockAddReq addReq, String userId);

    ResponseResult updateMedicineStock(MmsMedicineStockUpdateReq updateReq, String userId);

    ResponseResult increaseMedicineStock(MmsMedicineStockIncreaseReq increaseReq,String userId);

    ResponseResult reduceMedicineStock(MmsMedicineStockReduceReq reduceReq,String userId);

    ResponseResult deletedMedicineStock(MmsMedicineStockDeletedReq deletedReq);

    ResponseResult getMedicineStockDetail(String id);

    ResponseResult getMedicineStockList(Integer pageNum, Integer pageSize, String searchStr, String startDate, String endDate);

    ResponseResult getMedicineStockHistoryList(Integer pageNum, Integer pageSize, String searchStr, String startDate, String endDate,
                                               Integer stockType,String stockId);

    Future<ResponseResult> exportMedicineStock(MmsMedicineStockExportReq medicineStockExportReq, HttpServletResponse response);

    Future<ResponseResult> exportMedicineStockLog(MmsMedicineStockLogExportReq mmsMedicineStockLogExportReq, HttpServletResponse response);

    Future<ResponseResult> batchMedicineStock(Map<String, Object> map, String user_id);
}
